package com.example.sys.org.dao;

import com.example.core.dao.BaseDao;
import com.example.sys.org.po.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysUserRoleDao extends BaseDao<SysUserRole> {

    @Select("select ur.* from sys_user_role ur , sys_role re where re.id = ur.role_id and re.code = #{roleCode} and ur.user_id = #{userId}")
    public List<SysUserRole> hasRole(@Param("userId") String userId, @Param("roleCode") String roleCode);
}
